package com.wgts.wgts.mvp.model.imp;

import com.wgts.wgts.mvp.model.IMyOrderFragmentModel;
import com.wgts.wgts.netmodle.HttpResultSubscriber;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.netmodle.resp.CurrentEntity;
import com.wgts.wgts.netmodle.resp.MyOrderListEntity;

import java.util.List;

public class MyOrderFragmentModel implements IMyOrderFragmentModel {
    private NetService netService;

    public MyOrderFragmentModel( NetService netService){
        this.netService = netService;
    }

    @Override
    public void initList(String orderState, Integer pageIndex, Integer pageSize, HttpResultSubscriber<List<MyOrderListEntity>> subscriber) {
        netService.myOrderList(orderState, pageIndex, pageSize, subscriber);
    }

    @Override
    public void cancelOrder(String orderId, HttpResultSubscriber<CurrentEntity> subscriber) {
        netService.cancelOrder(orderId, subscriber);
    }

    @Override
    public void takeGoods(String orderId, HttpResultSubscriber<CurrentEntity> subscriber) {
        netService.takeGoods(orderId, subscriber);
    }

}
